home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dirut / retain20.zip / RETAINCD.BAT < prev   
DOS Batch File  |  1992-12-11  |  2KB  |  41 lines

  1. echo off
  2.  rem ===RETAINCD.BAT, vs. 2.0, 11/12-92===
  3. echo --- RETAINCD 2.0 (c) 1992, Jim Groeneveld; RETAIN & CD combo.
  4.  rem (1) retains the current drive:subdir and
  5.  rem (2) changes drive and subdir to the first parameter
  6. if "%1"=="" goto help
  7. if "%1"=="?" goto help
  8. if "%1"=="/?" goto help
  9. if "%1"=="-?" goto help
  10.  
  11. :CDD
  12. call retain %2 %3
  13.  rem command/c retain ; for DOS«3.3 (or use external CALL.COM program by me)
  14.  rem Check for existence of [drive:][path] could be included here, but isn't.
  15.  rem To suppress DOS error messages if the parameter contains no drive, but
  16.  rem only a subdirectory specification: CTTY NUL .
  17. ctty nul
  18. %1\
  19.  rem No check for existence of drive.
  20. ctty con
  21. cd %1
  22.  rem Invalid directories are reported by DOS and do not need to be analyzed here
  23. goto end
  24.  
  25. :help
  26. echo.
  27. echo Syntax: 'RETAINCD drive┼path [aux-path[aux-file]│*│[/│-]?│+ [rtn-spec]]',
  28. echo from the directory to retain, in which:
  29. echo drive    = drive specification to CD to, e.g. 'C:';
  30. echo path     = absolute (\[...[\...]]) or
  31. echo            relative   (...[\...]) path specification to CD to.
  32. echo     At least one of these (either drive or path) or both _must_ be specified.
  33. echo aux-path = drive:\subdir\ of auxiliary file $RETURN$.AUX, incl. trailing '\';
  34. echo aux-file = the eventual alternate auxiliary file name for $RETURN$.AUX;
  35. echo *        = list the currently stored paths;
  36. echo ? (or /? or -?) = display this help;
  37. echo +        = dummy second argument if additional third one specified;
  38. echo rtn-spec = (full drive, path and) file specification of the RETURN-file,
  39. echo            without '.BAT' extension, default C:\RETURN.
  40. :end
  41.